import { BaseModel } from '../../base/base/BaseModel';
import { prop } from 'typegoose';

export class ListModel extends BaseModel {
    // 标题
    @prop({ required: true })
    title!: string;

    // 封面
    @prop({ required: true })
    cover!: string;

    // 类型
    @prop({ required: true })
    type!: 'h5' | 'pages';

    // 是否启用
    @prop() isFocus?: boolean;
}

export const List = new ListModel().getModelForClass(ListModel, {
    schemaOptions: {
        timestamps: true,
        versionKey: false,
    },
});
